const WebSocket = require('ws');
const logger = global.logger;
const hybridsocket = require('./hybridsocket')
var curId = 1;
exports.start = function(port){
    const wss = new WebSocket.Server({ port: port });
    logger.info('server start: ' + port);
    wss.on('connection', function (ws) {
        console.log('new client connection');
        var socket = new hybridsocket(curId++, ws);
    });
}